#!/bin/bash

foo(){
	declare f1="f1"
	f2="f2"
}

bar(){
	foo
	echo "\$f1=$f1"
	echo "\$f2=$f2"
}

bar
#output:
#$f1=
#$f2=f2